 #pragma once

#include "cTexture.h"
#include "cData.h"
#include "cScene.h"
#include "cAnimatedVisibleItem.h"

#ifndef CTILEDSCENE_H
#define	CTILEDSCENE_H


class cTiledScene: public cScene{
public:
    cTiledScene(void);
    virtual ~cTiledScene(void);
    void InitFromIniFile(const char* pName, cData *Data, cCamera *Camera=NULL);
    bool LoadLevel(int level);
    void Draw();
    vector<int>* GetMap();
    int GetTileSize() const;
    int GetSceneHeight() const;
    int GetScenWidth() const;

private:
    int id_DL;
    vector<int> sceneMap;
    string fileNameTiledConfig;
    string extensionFilenameTiledConfig;
    int tileSize;
    int scenWidth;
    int sceneHeight;
    map<int, list<int> > animatedFrameTileId;
    list<cAnimatedVisibleItem*> animatedFrames;



    void Init();
    void setImageFileName(string iniValue, string &file);
    void setDataFilename(string iniValue);
    void setDataExtension(string iniValue);
    void setSceneDimension(string iniValueLine);
    void setTileSize(string iniValueLine);
    void setBlockSize(string iniValueLine);
    void setAnimatedTile(string iniValueLine);
};

#endif
